<?php

namespace app\api\validate;


class TicketValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'isPositiveInteger',//
        //出行
        'depart_number' => 'require|isNotEmpty',//航班号
        'depart_date' => 'require|isNotEmpty|date',//出现日期
        'depart_time' => 'require|isNotEmpty|date', //具体时间
        'depart_d_city' => 'require|isNotEmpty', //出发城市
        'depart_a_city' => 'require|isNotEmpty', //到达城市
        //返程
        'return_number' => 'require|isNotEmpty', //
        'return_date' => 'require|isNotEmpty|date', //
        'return_time' => 'require|isNotEmpty|date', //
        'return_d_city' => 'require|isNotEmpty', //
        'return_a_city' => 'require|isNotEmpty', //
    ];

    protected $message = [
        'depart_number.require' => '出行航班号不能为空',
        'depart_date.require' => '出行的日期不能为空',
        'depart_date.date' => '出行的日期不能为空输入有误',
        'depart_time.require' => '出行的具体时间不能为空',
        'depart_time.date' => '出行的具体时间不能为空输入有误',
        'depart_d_city.require' => '出行的出发城市不能为空',
        'depart_a_city.require' => '出行的到达城市不能为空',

        'return_number.require' => '返程航班号不能为空',
        'return_date.require' => '返程的日期不能为空',
        'return_date.date' => '返程的日期不能为空输入有误',
        'return_time.require' => '返程的具体时间不能为空',
        'return_time.date' => '返程的具体时间不能为空输入有误',
        'return_d_city.require' => '返程的出发城市不能为空',
        'return_a_city.require' => '返程的到达城市不能为空',
    ];
}
